<?
class TasksBO extends BusinessObject{

  /* private function using in constructors*/ 
  function setAttributes(){
    $this->fields   = array(
		id			=>   "tasksID",
		question	=>   "tasksQuestion",   
		answer		=>   "tasksAnswer",
		date		=>   "tasksDate",
		visibility	=>   "tasksVisible",
		lang_id		=>   "tasksLang");
    BusinessObject::setAttributes();
  }  
  /* constructor */
  function TasksBO(){
    /** super(tableName) */
    BusinessObject::BusinessObject("tasks");
    $this->setAttributes();
  }

 function Delete($tasksIDs){
    if(is_numeric($tasksIDs) || is_array($tasksIDs) ) {
		$id_list=is_array($tasksIDs)?implode(",",$tasksIDs):$tasksIDs;
		// echo '<hr><font color="#ff00ff"><b>'.$id_list.'</b></font><hr>';
	if($id_list != ""){
	 	$this->ExecuteQuery("DELETE FROM {$this->tableName} WHERE {$this->fields[id]} IN (".$id_list.")");
		// echo '<hr><font color="#008080"><b>'."DELETE FROM {$this->tableName} WHERE {$this->fields[id]} IN (".$id_list.")".'</b></font><hr>';;
	 }
	}else
	{
		// echo "<font color=red><b>not NUMBER ID</b></font>";
	}
  }

}
?>
